# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=sxmo-surf
pkgver=2.0.3
pkgrel=3
pkgdesc="Surf fork for Sxmo UI; supports externalpipe, keyword searching, non-JS by default"
url="https://git.sr.ht/~mil/sxmo-surf"
arch="all"
license="MIT"
depends="xprop libxml2-utils sxmo-dmenu"
makedepends="webkit2gtk-4.1-dev"
provides="surf-virtual"
provider_priority=10
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~mil/sxmo-surf/archive/$pkgver.tar.gz
	webkit2gtk-4.1.patch
	gcc14.patch
	"
subpackages="$pkgname-doc"
options="!check" # has no tests

prepare() {
	default_prepare
	sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \
		-e '/LDFLAGS/{s/-s//;s/=/+=/}' \
		"$builddir"/config.mk
}

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX="/usr" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 README TODO.md \
		"$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
39f0265f62148cb819022699077fde64264fdc4d4586741d1b216409557a58e12fda4ea84d0ee08c035a94b1665c2684bae9cb7412ccfb16b90b958f966b9e1f  sxmo-surf-2.0.3.tar.gz
9666c44bc7b9887fab1bf7c6a2584207d4f14d81cd17674522ce7280937e9f735565c95abe2880fe7f3cbb81d6df1f8b5da0e5ea5ce7909d6350634aa167fdb4  webkit2gtk-4.1.patch
08d402325a49ccbb5388e02cf42226ab5d497a924775fcd943c7e4f8e1177fae79cc92542e02046b5620a9afc925ef29de95d9b1ccb10fc35332211a7b850d4f  gcc14.patch
"
